<?php


/*
 * Created on 27.08.2009
 *
 * by MasterGenny
 */
class GalleryVO {
	
	public $id;

	public $title;
	
	public $startImage;
	
	public $description;
	
	public $location;
	
	public $dateFirstPersist;
	
	public $dateLastPersist;
	
	public $userId;
	
	public function __construct($id = 0) {
		$this->id;
		$this->title = "";
		$this->startImage = 0;
		$this->description = "";
		$this->location = "";
		$this->dateFirstPersist = "";
		$this->dateLastPersist = "";
		$this->userId = 0;
	}

	public function __get($pMemberName) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			return $this-> $member;
		}
	}

	public function __set($pMemberName, $pValue) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			$this-> $member = $pValue;
		}
	}

	public function show() {
		$members = get_object_vars($this);
		echo __CLASS__.": ";
		foreach ($members as $key => $value) {
			printf("%s= %s ", $key, $value);
		}
		echo "<br/>";
	}

	public function getObjectVars() {
		return get_object_vars($this);
	}
}
/**
 * Value object of team with all attributes in one object
 */
class ImageVO {

	public $id;

	public $subtitle;

	public $fileName;

	public $thumbName;

	public $pos;

	public $width;

	public $height;

	public $filesize;

	public $userId;

	public $galleryId;
	
	public $dateFirstPersist;
	
	public function __construct($id = 0) {
		$this->id;
		$this->subtitle = "";
		$this->fileName = "";
		$this->thumbName = "";
		$this->pos = 9999;
		$this->width = 0;
		$this->height = 0;
		$this->filesize = 0;
		$this->userId = 0;
		$this->galleryId = 0;
		$this->dateFirstPersist = "";
	}

	public function __get($pMemberName) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			return $this-> $member;
		}
	}

	public function __set($pMemberName, $pValue) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			$this-> $member = $pValue;
		}
	}

	public function show() {
		$members = get_object_vars($this);
		echo __CLASS__.": ";
		foreach ($members as $key => $value) {
			printf("%s= %s ", $key, $value);
		}
		echo "<br/>";
	}

	public function getObjectVars() {
		return get_object_vars($this);
	}
}
?>
